var vm = new Vue({
	el:"#mbody",
	data:{
		//按钮
		startBtn:false,
		callBtn:true,
		endBtn:true,
		sendBtn:true,
		
		//文本区
		localText:false,
		remoteText:false,
		localTextarea:true,
		remoteTextarea:true,
		
		//视频流资源
		localVideo:false,
		remoteVideo:false,
		
		//视频流
		localStream:false,
		remoteStream:false,
		
		//端
		local:null,
		remote:null,
		
		//发送通道
		sendChannel:null,
		
		//设备
		deviceObj:{
			video:true,
			audio:{
				echoCancellation:false
			}
		}
	},
	methods:{
		start:function(){
			//初始化本地视频流
			initialise(vm.deviceObj);
		},
		call:function(){
			//订阅私人频道
			stomp.subscribe("/user/topic/private/message",handlePrivateMessage);
			sendMsg("/app/create-or-join");
			vm.callBtn = true;
			vm.endBtn = false;
		},
		end:function(){
			/*vm.endBtn = true;
			
			vm.sendBtn = true;
			
			vm.localTextarea = true;
			vm.remoteTextarea = true;*/
			
			/*closeStream();*/
			sendMsg("/test/message","bye");
			closeWebRTC();
		},
		send:function(){
			/*sendData();*/
		}/*,
		test:function(){
			sendMsg("/app/test/message","test test test");
		}*/
	}
});